package com.zdya.bigloghandler;


import com.google.gson.Gson;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Map;

public class JsonParse {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String ss = "{\"result\":\"{\\\"reason\\\":\\\"解析成功\\\",\\\"resultcode\\\":\\\"0\\\",\\\"body\\\":\\\"http://32.0.11.10:8080/htqspt/preview.html?id=def78bd0edbc48118cc80ab657ad6953&seal=%255B%257B%2522t%2522%253A%25223%2522%252C%2522u%2522%253A%2522uploadFiles%252Ffile%252F20190531%252F7e8c9511c57c41a19d29de4afc1fcf50.png%2522%252C%2522i%2522%253A%2522dda41625d8ba42ec9c28c9388afa6628%2522%257D%255D&p=5\\\"}\",\"signdata\":\"S+E1K0TDk4Xngs2/yJ2Q2jAdQr/stjwJnrLXJlRJGaJ0Dz/ajpYdY278lwIJzEuXBcNQzTLtWzV2\\r\\nXkA1OJhu/P21aVlYaCd5+EcxLTuY4pqK7MM6snZGEmTEeEE7i1WUrumridsWF9Z7jfArKBXPeEBD\\r\\n0A/er4AheYvl6FGjFPwWUv3GqSHmRW7IL4huxG2SMVaNdoC9MwFhxSdR2Zv/oG43v2DL6c5N9rAn\\r\\ncdiivaMvmybBSq1hOtEk1EbddiyEt5ZGr8Xcd0wWWcE7/7VdhjlRrJEWIoJbyijUkKtoANfgybqT\\r\\n/2ECTPJBVriP0ZYzU3Msz0R2RDwrEJ3DMDUcvQ==\"}";
        Gson gson = new Gson();
        Map map = gson.fromJson(ss, Map.class);
        String result = (String) map.get("result");
        Map resultMap = gson.fromJson(result,Map.class);
        String body = (String) resultMap.get("body");
        System.out.println(URLDecoder.decode(body,"UTF-8"));
    }
}
